Determining model parameters using secret sharing

ABSTRACT

This disclosure relates to determining model parameters using secret sharing. In some aspects, a first data party device obtains a first share of a Hessian matrix for a data processing model. The first data party device obtains, using secret sharing with the second data party device, a first share of a product of a random number matrix and the Hessian matrix. The first data party device, determines a first share of a first inverse matrix based on a second inverse matrix and the first share of the random number matrix. The first data party device determines the first inverse matrix, a first share of a product of the first inverse matrix and a gradient of a loss function of the data processing model, and a first share of a new model parameter for the data processing model.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of PCT Application No. PCT/CN2020/071432, filed on Jan. 10, 2020, which claims priority to Chinese Patent Application No. 201910734775.4, filed on Aug. 9, 2019, and each application is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

Implementations of the present specification relate to the field of computer technologies, and in particular, to determining model parameters using secret sharing.

BACKGROUND

In the big data era, there are many data islands. Data is usually distributed among different enterprises. In consideration of competition and privacy protection, the enterprises do not trust each other completely. In some cases, cooperative security modeling needs to be performed between enterprises, so a data processing model is cooperatively trained by using data of the enterprises while data privacy of the enterprises is fully protected.

When the data processing model is cooperatively trained, a model parameter of the data processing model can be optimized and adjusted a plurality of times by using a model parameter optimization method.

SUMMARY

An objective of implementations of the present specification is to provide a model parameter determining method and apparatus, and an electronic device, so a model parameter of a data processing model can be determined through multiparty cooperation while data privacy is protected. Because data used to train the data processing model is distributed among parties in cooperative modeling, how to cooperatively determine the model parameter of the data processing model while data privacy is protected is a technical problem that needs to be urgently resolved at present.

To achieve the previous objective, one or more implementations of the present specification provide the following technical solutions:

According to a first aspect of one or more implementations of the present specification, a model parameter determining method is provided, applied to a first data party and including: secretly sharing a hessian matrix with a cooperation partner based on feature data and a share of a value of an activation function, to obtain a share of the hessian matrix; secretly sharing a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and secretly sharing a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

According to a second aspect of one or more implementations of the present specification, a model parameter determining apparatus is provided, applied to a first data party and including: a first secret sharing (SS) unit, configured to secretly share a hessian matrix with a cooperation partner based on feature data and a share of a value of an activation function, to obtain a share of the hessian matrix; a second SS unit, configured to secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and a third SS unit, configured to secretly share a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

According to a third aspect of one or more implementations of the present specification, an electronic device is provided, including: a memory, configured to store a computer instruction; and a processor, configured to execute the computer instruction to implement the method steps according to the first aspect.

According to a fourth aspect of one or more implementations of the present specification, a model parameter determining method is provided, applied to a second data party and including: secretly sharing a hessian matrix with a cooperation partner based on a share of a value of an activation function, to obtain a share of the hessian matrix; secretly sharing a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and secretly sharing a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

According to a fifth aspect of one or more implementations of the present specification, a model parameter determining apparatus is provided, applied to a second data party and including: a first SS unit, configured to secretly share a hessian matrix with a cooperation partner based on a share of a value of an activation function, to obtain a share of the hessian matrix; a second SS unit, configured to secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and a third SS unit, configured to secretly share a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

According to a sixth aspect of one or more implementations of the present specification, an electronic device is provided, including: a memory, configured to store a computer instruction; and a processor, configured to execute the computer instruction to implement the method steps according to the fourth aspect.

It can be seen from the previous technical solutions provided in the implementations of the present specification that in the implementations of the present specification, the first data party and the second data party can cooperatively determine the model parameter of the data processing model by using an SS algorithm without leaking their own data. In addition, because a Newton's method is used, the model parameter determining method in the implementations has a relatively high convergence speed, so a quantity of times of model parameter optimization and adjustment can be reduced, and training efficiency of the data processing model can be improved.

BRIEF DESCRIPTION OF DRAWINGS

To describe technical solutions in implementations of the present specification or in the existing technology more clearly, the following briefly describes the accompanying drawings needed for describing the implementations or the existing technology. Clearly, the accompanying drawings in the following descriptions merely show some implementations of the present specification, and a person of ordinary skill in the art can still derive other drawings from these accompanying drawings without creative efforts.

FIG. 1 is a schematic diagram illustrating a model parameter determining system, according to an implementation of the present specification;

FIG. 2 is a flowchart illustrating a model parameter determining method, according to an implementation of the present specification;

FIG. 3 is a flowchart illustrating a model parameter determining method, according to an implementation of the present specification;

FIG. 4 is a flowchart illustrating a model parameter determining method, according to an implementation of the present specification;

FIG. 5 is a schematic diagram illustrating a model parameter determining apparatus, according to an implementation of the present specification;

FIG. 6 is a schematic diagram illustrating a model parameter determining apparatus, according to an implementation of the present specification; and

FIG. 7 is a function structural diagram illustrating an electronic device, according to an implementation of the present specification.

DESCRIPTION OF IMPLEMENTATIONS

The following clearly and comprehensively describes the technical solutions in the implementations of the present specification with reference to the accompanying drawings in the implementations of the present specification. Clearly, the described implementations are merely some rather than all of the implementations of the present specification. All other implementations obtained by a person of ordinary skill in the art based on the implementations of the present specification without creative efforts shall fall within the protection scope of the present specification. It should be understood that although terms “first”, “second”, “third”, etc. can be used in the present specification to describe various types of information, the information is not limited to the terms. These terms are only used to differentiate between information of the same type. For example, without departing from the scope of the present specification, first information can also be referred to as second information, and similarly, the second information can be referred to as the first information.

A model parameter optimization method can include a gradient descent method, a Newton's method, etc. The Newton's method can include an original Newton's method and various variants based on the original Newton's method, such as a damped Newton's method and a regularized Newton's method. The regularized Newton's method is a Newton's method with a regularized term. Regularization can reduce complexity and instability of a model, thereby reducing a risk of overfitting. The Newton's method has a higher convergence speed than the gradient descent method. Therefore, if parties in cooperative modeling cooperatively determine a model parameter of a data processing model through secret sharing (SS) by using the Newton's method, not only data privacy of the parties in cooperative modeling can be protected, but also a quantity of times of model parameter optimization and adjustment can be reduced, and training efficiency of the data processing model can be improved.

SS is an algorithm for protecting data privacy. A plurality of data parties can perform cooperative calculation by using the SS algorithm without leaking their own data, to obtain secret information. Each data party can obtain a share of the secret information. A single data party cannot recover the secret information. The secret information can be recovered only when the plurality of data parties cooperate. For example, data party P₁ owns data x₁, and data party P₂ owns data x₂. When the SS algorithm is used, data party P₁ and data party P₂ can perform cooperative calculation to obtain secret information y=y₁+y₂=x₁x₂. Data party P₁ can obtain share y₁ of secret information y after calculation, and data party P₂ can obtain share y₂ of secret information y after calculation.

In a cooperative security modeling scenario, to protect data privacy, a plurality of data parties can cooperatively train the data processing model based on their own data without leaking their own data. The data processing model can be a machine learning model. For example, the data processing model can includes, but is not limited to, a logistic regression model, a neural network model, etc. When the data processing model is trained, a model parameter of the data processing model can be optimized and adjusted by using the model parameter optimization method. The model parameter can be a machine learning model parameter, e.g., a weight or a bias of a machine learning model. In the cooperative security modeling scenario, data used to train the data processing model is distributed among data parties in cooperative modeling. Therefore, in the cooperative security modeling scenario, the model parameter optimization method can be implemented by using the SS algorithm.

A loss function can be used to measure a degree of inconsistency between a predicted value and a real value of the data processing model. A smaller value of the loss function indicates better robustness of the data processing model. The loss function includes but is not limited to a logarithmic loss function, a square loss function, etc.

A hessian matrix is a square matrix of second-order partial derivatives of the loss function, and is used to represent a local curvature of the loss function.

An activation function can be used to construct the data processing model. The activation function defines the output given the input. A non-linear factor can be added to the data processing model by using the activation function, to improve an expression capability of the data processing model. For example, the activation function can include a Sigmoid function, a Tanh function, a ReLU function, etc.

The present specification provides an implementation of a model parameter determining system.

Referring to FIG. 1, in this implementation, the model parameter determining system can include a first data party, a second data party, and a trusted third party (TTP).

The third party can be a server, or can be a server cluster including a plurality of servers. The third party can be used to provide a random number to each of the first data party and the second data party. Specifically, the third party can generate a random number matrix, divide each random number in the random number matrix into two shares, and use one of the two shares as a first share and use the other share of the two shares as a second share. The third party can use a matrix formed by first shares of the random numbers in the random number matrix as a first share of the random number matrix, use a matrix formed by second shares of the random numbers in the random number matrix as a second share of the random number matrix, send the first share of the random number matrix to the first data party, and send the second share of the random number matrix to the second data party. The sum of the first share of the random number matrix and the second share of the random number matrix is equal to the random number matrix.

The first data party and the second data party are respectively parties in cooperative security modeling. The first data party can be a data party that does not own a label, and the second data party can be a data party that owns a label. For example, the first data party can own complete feature data, and the second data party can own a label of the feature data. Or the first data party can own a part of data items of feature data, and the second data party can own another part of data items and a label of the feature data. Specifically, for example, the feature data can include a saving amount and a loan amount of a user. The first data party can own the saving amount of the user, and the second data party can own the loan amount of the user and the label of the feature data. The label can be used to distinguish between different types of feature data, and a specific value can be, for example, 0 and 1. The data party here can be an electronic device. The electronic device can include a personal computer, a server, a handheld device, a portable device, a flat panel device, and a multi-processor apparatus, or can include a cluster formed by any plurality of the previous apparatuses or devices. In addition, the feature data and the label corresponding to the feature data constitute sample data together, and the sample data can be used to train the data processing model.

In a cooperative security modeling scenario, the first data party and the second data party each can obtain a share of an original model parameter. Here, a share obtained by the first data party can be used as a first share of the original model parameter, and a share obtained by the second data party can be used as a second share of the original model parameter. The sum of the first share of the original model parameter and the second share of the original model parameter is equal to the original model parameter.

The first data party can receive the first share of the random number matrix. The second data party can receive the second share of the random number matrix. The first data party and the second data party can cooperatively determine a new model parameter through SS respectively based on the first share of the original model parameter, the feature data, and the first share of the random number matrix and based on the second share of the original model parameter, the label, and the second share of the random number matrix. The first data party and the second data party each can obtain a share of the new model parameter. For a specific process, references can be made to the following implementation of a model parameter determining method.

The present specification further provides an implementation of a model parameter determining method.

In this implementation, a modified Newton's method can be used to determine a model parameter. Referring to FIG. 2, this implementation can include the following steps.

Step S11: A first data party and a second data party secretly share a hessian matrix respectively based on feature data and a first share of a value of an activation function and based on a second share of the value of the activation function, where the first data party obtains a first share of the hessian matrix, and the second data party obtains a second share of the hessian matrix.

Step S13: The first data party and the second data party secretly share a first inverse matrix respectively based on the first share of the hessian matrix and the second share of the hessian matrix, where the first data party obtains a first share of the first inverse matrix, the second data party obtains a second share of the first inverse matrix, and the first inverse matrix is an inverse matrix of the hessian matrix.

Step S15: The first data party and the second data party secretly share a new model parameter respectively based on a first share of an original model parameter, the first share of the first inverse matrix, and a first share of a gradient of a loss function and based on a second share of the original model parameter, the second share of the first inverse matrix, and a second share of the gradient of the loss function, where the first data party obtains a first share of the new model parameter, and the second data party obtains a second share of the new model parameter.

The following describes some terms in the implementations.

(1) A first product, a second product, and a third product: The first product can be a product of the original model parameter and the feature data. The second product can be a product of a random number matrix and the hessian matrix. The third product can be a product of the inverse matrix of the hessian matrix and the gradient of the loss function.

In some scenario examples, the first product can be represented as XW, where W represents the original model parameter that is specifically a vector formed by the original model parameter, and X represents the feature data that is specifically a matrix formed by the feature data.

The second product can be represented as HR, where H represents the hessian matrix, and R represents the random number matrix.

The third product can be represented as H⁻¹dW, where H⁻¹ represents the inverse matrix of the hessian matrix, dW represents the gradient of the loss function, and dW is a vector.

(2) The first inverse matrix and a second inverse matrix: Because the hessian matrix is a square matrix, inversion processing can be performed on the hessian matrix, and the inverse matrix of the hessian matrix can be used as the first inverse matrix. Because the second product can be a square matrix, inversion processing can be performed on the second product, and an inverse matrix of the second product can be used as the second inverse matrix.

In the previous scenario examples, the first inverse matrix can be represented as H⁻¹, and the second inverse matrix can be represented as (HR)⁻¹.

In some implementations, before step S11, the first data party and the second data party can secretly share the first product respectively based on the feature data and the first share that is of the original model parameter and that is owned by the first data party and based on the second share that is of the original model parameter and that is owned by the second data party. The first data party and the second data party each can obtain a share of the first product. For ease of description, a share obtained by the first data party can be used as a first share of the first product, and a share obtained by the second data party can be used as a second share of the first product. The sum of the first share of the first product and the second share of the first product is equal to the first product.

In the previous scenario examples, the first share of the original model parameter can be represented as <W>₀, and the second share of the original model parameter can be represented as <W>₁, where <W>₀+<W>₁=W. The first data party and the second data party can secretly share the first product XW respectively based on X and <W>₀ and based on <W>₁. The first data party can obtain the first share <XW>₀ of the first product, and the second data party can obtain the second share <XW>₁ of the first product, where <XW>₀+<XW>₁=XW.

Further, the first data party and the second data party can further secretly share a value of a polynomial respectively based on the first share of the first product and the second share of the first product. The first data party and the second data party each can obtain a share of the value of the polynomial. The polynomial can be used to fit the activation function of the data processing model. As such, a share obtained by the first data party can be used as the first share of the value of the activation function, and a share obtained by the second data party can be used as the second share of the value of the activation function. The sum of the first share of the value of the activation function and the second share of the value of the activation function is equal to the value of the activation function. Certainly, the present specification is not limited to the previous implementation of secretly sharing the value of the activation function through fitting by using the polynomial. The value of the activation function can be secretly shared by using another method.

In the previous scenario examples, the activation function can be a Sigmoid function. The value of the activation function can be represented as a=sigmoid(XW). The first share of the value of the activation function can be represented as <a>₀, and the second share of the value of the activation function can be represented as <a>₁, where <a>₀+<a>₁=a and <a>₀, <a>₁, and a are vectors.

Further, the first data party and the second data party can further secretly share the gradient of the loss function respectively based on the feature data and the first share of the value of the activation function and based on a label and the second share of the value of the activation function. The first data party and the second data party each can obtain a share of the gradient of the loss function. For ease of description, a share obtained by the first data party can be used as the first share of the gradient of the loss function, and a share obtained by the second data party can be used as the second share of the gradient of the loss function. The sum of the first share of the gradient of the loss function and the second share of the gradient of the loss function is equal to the gradient of the loss function.

In the previous scenario examples, the first data party and the second data party can secretly share the gradient dW (which is specifically a vector) of the loss function respectively based on X and <a>₀ and based on label Y and <a>₁. The first data party can obtain the first share <dW>₀ of the gradient of the loss function, and the second data party can obtain the second share <dW>₁ of the gradient of the loss function.

The following describes a detailed process of secretly sharing the gradient of the loss function dW by the first data party and the second data party.

The first data party and the second data party can secretly share X^(T)<a>₁ respectively based on X and <a>₁. The first data party can obtain <[X^(T)<a>₁]>₀, and the second data party can obtain <[X<a>₁]>₁, where <[X^(T)<a>₁]>₀+<[X<a>₁]>₁=X^(T)<a>₁.

The first data party and the second data party can further secretly share X^(T)Y respectively based on X and label Y (which is specifically a vector formed by the label). The first data party can obtain <X^(T)Y>₀, and the second data party can obtain <X^(T)Y>₁, where <X^(T)Y>₀+<X^(T)Y>₁=X^(T)Y.

The first data party can calculate X^(T)<a>₀, and can calculate X^(T)<a>₀+<[X^(T)<a>₁]>₀−<X^(T)Y>₀ as the first share <dW>₀ of the gradient dW of the loss function, and the second data party can calculate <[X^(T)<a>₁]>₁−<X^(T)Y>₁ as the second share <dW>₁ of the gradient dW of the loss function:

$\begin{matrix} {{dW} = {{\langle{dW}\rangle}_{0} + {\langle{dW}\rangle}_{1}}} \\ {= {{X^{T}{\langle a\rangle}_{0}} + {\langle\left\lbrack {X^{T}{\langle a\rangle}_{1}} \right\rbrack\rangle}_{0} - {\langle{X^{T}Y}\rangle}_{0} + {\langle\left\lbrack {X^{T}{\langle a\rangle}_{1}} \right\rbrack\rangle}_{1} - {\langle{X^{T}Y}\rangle}_{1}}} \\ {= {{X^{T}{\langle a\rangle}_{0}} + {X^{T}{\langle a\rangle}_{1}} - {X^{T}Y}}} \\ {= {{X^{T}a} - {X^{T}Y}}} \\ {= {{X^{T}\left( {a - Y} \right)}.}} \end{matrix}$

In some implementations, in step S1, the first data party and the second data party can secretly share the hessian matrix respectively based on the feature data and the first share of the value of the activation function and based on the second share of the value of the activation function. The first data party and the second data party each can obtain a share of the hessian matrix. For ease of description, a share obtained by the first data party can be used as the first share of the hessian matrix, and a share obtained by the second data party can be used as the second share of the hessian matrix. The sum of the first share of the hessian matrix and the second share of the hessian matrix is equal to the hessian matrix.

Specifically, the first data party and the second data party can secretly share a diagonal matrix respectively based on the share of the value of the activation function and the second share of the value of the activation function. The first data party and the second data party each can obtain a share of the diagonal matrix. For ease of description, a share obtained by the first data party can be used as a first share of the diagonal matrix, and a share obtained by the second data party can be used as a second share of the diagonal matrix. The sum of the first share of the diagonal matrix and the second share of the diagonal matrix is equal to the diagonal matrix. As such, the first data party and the second data party can secretly share the hessian matrix respectively based on the feature data and the first share of the diagonal matrix and based on the second share of the diagonal matrix. The first data party can obtain the first share of the hessian matrix, and the second data party can obtain the second share of the hessian matrix.

In the previous scenario examples, the first data party and the second data party can secretly share the diagonal matrix RNN respectively based on <a>₀ and <a>₁. The first data party can obtain the first share RNN₀ of the diagonal matrix, and the second data party can obtain the second share RNN₁ of the diagonal matrix.

The following describes a detailed process of secretly sharing the diagonal matrix RNN by the first data party and the second data party.

The first data party and the second data party can secretly share <a>₀·<a>₁ respectively based on <a>₀ and <a>₁. The first data party can obtain <[<a>₀·<a>₁]>₀, and the second data party can obtain <[<a>₀·<a>₁]>₁, where <[<a>₀·<a>₁]>₀+<[<a>₀·<a>₁]>=<a>₀·<a>₁, and · represents a bitwise multiplication operation. For example, if vector m=(m₁,m₂,m₃) and vector n=(n₁,n₂,n₃), m·n=(m₁n₁,m₂n₂,m₃n₃).

The first data party can calculate <r>₀=<a>₀−<[<a>₀·<a>₁]>₀−<a>₀·<a>₀, and the second data party can calculate <r>₁=<a>₁−<[<a>₀·<a>₁]>₀−<a>₁·<a>₁:

$\begin{matrix} {r = {{\langle r\rangle}_{0} + {\langle r\rangle}_{1}}} \\ {= {{\langle a\rangle}_{0} - {\langle\left\lbrack {{\langle a\rangle}_{0} \cdot {\langle a\rangle}_{1}} \right\rbrack\rangle}_{0} - {{\langle a\rangle}_{0} \cdot {\langle a\rangle}_{0}} + {\langle a\rangle}_{1} - {\langle\left\lbrack {{\langle a\rangle}_{0} \cdot {\langle a\rangle}_{1}} \right\rbrack\rangle}_{0} - {{\langle a\rangle}_{1} \cdot {\langle a\rangle}_{1}}}} \\ {= {\left\{ {{\langle a\rangle}_{0} + {\langle a\rangle}_{1}} \right\} \left\{ {1 - {\langle a\rangle}_{0} - {\langle a\rangle}_{1}} \right\}}} \\ {= {a\left( {1 - a} \right)}} \end{matrix}$

where <r>₀, <r>₁, and r are vectors. Therefore, the first data party can generate the first share RNN₀=diag(<r>₀) of the diagonal matrix RNN=diag(r) based on <r>₀, and the second data party can obtain the second share RNN₁=diag(<r>₁) of the diagonal matrix RNN=diag(r) based on <r>₁, where RNN₀+RNN₁=RNN. The first share RNN₀ and the second share RNN₁ of the diagonal matrix RNN each can be a diagonal matrix. In an actual processing process, the first data party can use a data element in <r>₀ as a data element on a main diagonal of RNN₀, thereby generating RNN₀ based on <r>₀, and the second data party can use a data element in <r>₁ as a data element on a main diagonal of RNN₁, thereby generating RNN₁ based on <r>₁.

The first data party and the second data party can secretly share the hessian matrix H respectively based on X and RNN₀ and based on RNN₁. The first data party can obtain the first share <H>₀ of the hessian matrix, and the second data party can obtain the second share <H>₁ of the hessian matrix.

The following describes a detailed process of secretly sharing the hessian matrix H by the first data party and the second data party.

The first data party and the second data party can secretly share X^(T)RNN₁ respectively based on X and RNN. The first data party can obtain <X^(T)RNN₁>₀, and the second data party can obtain <X^(T)RNN₁>₁, where <X^(T) RNN₁>₀+<X^(T)RNN₁>₁=X^(T)RNN₁.

The first data party and the second data party can further secretly share <X^(T)RNN₁>₁X respectively based on X and <X^(T)RNN₁>₁. The first data party can obtain <[<X^(T)RNN₁>₁X]>₀, and the second data party can obtain <[<X^(T)RNN₁>₁X]>₁, where <[<X^(T)RNN₁>=₁ X]>₀+<[<X^(T)RNN₁>₁X]>₁=<X^(T)RNN₁>₁X.

The first data party can calculate X^(T)RNN₀X+<X^(T)RNN₁>₀X+<[<X^(T)RNN₁>₁X]>₀ as the first share <H>₀ of the hessian matrix H, and the second data party can use <[<X^(T)RNN₁>₁X]>₁ as the second share <H>₁ of the hessian matrix H:

$\begin{matrix} {H = {{\langle H\rangle}_{0} + {\langle H\rangle}_{1}}} \\ {= {{X^{T}{RNN}_{0}X} + {{\langle{X^{T}{RNN}_{1}}\rangle}_{0}X} + {\langle\left\lbrack {{\langle{X^{T}{RNN}_{1}}\rangle}_{1}X} \right\rbrack\rangle}_{0} + {\langle\left\lbrack {{\langle{X^{T}{RNN}_{1}}\rangle}_{1}X} \right\rbrack\rangle}_{1}}} \\ {= {{X^{T}{RNN}_{0}X} + {{\langle{X^{T}{RNN}_{1}}\rangle}_{0}X} + {{\langle{X^{T}{RNN}_{1}}\rangle}_{1}X}}} \\ {= {{X^{T}{RNN}_{0}X} + {X^{T}{RNN}_{1}X}}} \\ {= {X^{T}{{RNNX}.}}} \end{matrix}$

In some implementations, a third party can send a first share of the random number matrix to the first data party, and send a second share of the random number matrix to the second data party. The sum of the first share of the random number matrix and the second share of the random number matrix is equal to the random number matrix. The first data party can receive the first share of the random number matrix, and the second data party can receive the second share of the random number matrix. As such, in step S13, the first data party can secretly share the second product respectively based on the first share of the random number matrix and the first share of the hessian matrix and based on the second share of the random number matrix and the second share of the hessian matrix. The first data party and the second data party each can obtain a share of the second product. For ease of description, a share obtained by the first data party can be used as a first share of the second product, and a share obtained by the second data party can be used as a second share of the second product. The sum of the first share of the second product and the second share of the second product is equal to the second product.

In some implementations of this implementation, the second data party can perform inversion processing on the second product. Specifically, the first data party can send the first share of the second product to the second data party. The second data party can receive the first share of the second product, and can add the first share of the second product and the second share that is of the second product and that is owned by the second data party, to obtain the second product. Because the second product is a square matrix, the second data party can perform inversion processing on the second product to obtain an inverse matrix of the second product as the second inverse matrix, and can send the second inverse matrix to the first data party. The first data party can receive the second inverse matrix. Or in some other implementations of this implementation, the first data party can perform inversion processing on the second product. Specifically, the second data party can send the second share of the second product to the first data party. The first data party can receive the second share of the second product, and can add the second share of the second product and the first share that is of the second product and that is owned by the first data party, to obtain the second product. Because the second product is a square matrix, the first data party can perform inversion processing on the second product to obtain an inverse matrix of the second product as the second inverse matrix, and can send the second inverse matrix to the second data party. The second data party can receive the second inverse matrix.

The first data party can multiply the first share of the random number matrix and the second inverse matrix, to obtain the first share of the first inverse matrix. The second data party can multiply the second share of the random number matrix and the second inverse matrix, to obtain the second share of the first inverse matrix. The sum of the first share of the first inverse matrix and the second share of the first inverse matrix is equal to the first inverse matrix.

In the previous scenario examples, the first share of the random number matrix can be represented as <R>₀, and the second share of the random number matrix can be represented as <R>₁, where <R>₀+<R>₁=R. The first data party and the second data party can secretly share the second product HR respectively based on <R>₀ and <H>₀ and based on <R>₁ and <H>₁. The first data party can obtain the first share <HR>₀ of the second product, and the second data party can obtain the second share <HR>₁ of the second product.

The following describes a detailed process of secretly sharing the second product HR by the first data party and the second data party.

The first data party and the second data party can secretly share <H>₀<R>₁ respectively based on <H>₀ and <R>₁. The first data party can obtain <[<H>₀<R>₁]>₀, and the second data party can obtain <[<H>₀<R>₁]>₁, where <[<H>₀<R>₁]>₀+<[<H>₀<R>₁]>₁=<H>₀<R>₁.

The first data party and the second data party can further secretly share <H>₁<R>₀ respectively based on <R>₀ and <H>₁. The first data party can obtain <[<H>₁<R>₀]>₀, and the second data party can obtain <[<H>₁<R>₀]>₁, where <[<H>₁<R>₀]>₀+<[<H>₁<R>₀]>₁=<H>₁<R>₀.

The first data party can calculate <H>₀<R>₀+<[<H>₀<R>₁]>₀+<[<H>₁<R>₀]>₀ as the first share <HR>₀ of the second product, and the second data party can calculate <H>₁<R>₁+<[<H>₀<R>₁]>₁+<[<H>₁<R>₀]>₁ as the second share <HR>₁ of the second product:

$\begin{matrix} {{HR} = {{\langle{HR}\rangle}_{0} + {\langle{HR}\rangle}_{1}}} \\ {= {{{\langle H\rangle}_{0}{\langle R\rangle}_{0}} + {\langle\left\lbrack {{\langle H\rangle}_{0}{\langle R\rangle}_{1}} \right\rbrack\rangle}_{0} + {\langle\left\lbrack {{\langle H\rangle}_{1}{\langle R\rangle}_{0}} \right\rbrack\rangle}_{0} +}} \\ {{{{\langle H\rangle}_{1}{\langle R\rangle}_{1}} + {\langle\left\lbrack {{\langle H\rangle}_{0}{\langle R\rangle}_{1}} \right\rbrack\rangle}_{1} + {\langle\left\lbrack {{\langle H\rangle}_{1}{\langle R\rangle}_{0}} \right\rbrack\rangle}_{1}}} \\ {= {{{\langle H\rangle}_{0}{\langle R\rangle}_{0}} + {{\langle H\rangle}_{0}{\langle R\rangle}_{1}} + {{\langle H\rangle}_{1}{\langle R\rangle}_{0}} + {{\langle H\rangle}_{1}{\langle R\rangle}_{1}}}} \\ {= {\left( {{\langle H\rangle}_{0} + {\langle H\rangle}_{1}} \right){\left( {{\langle R\rangle}_{0} + {\langle R\rangle}_{1}} \right).}}} \end{matrix}$

Here, the second data party performs inversion processing on the second product HR. Specifically, the first data party can send the first share <HR>₀ of the second product to the second data party. The second data party can receive the first share <HR>₀ of the second product, can add the first share <HR>₀ of the second product and the second share <HR>₁ that is of the second product and that is owned by the second data party, to obtain the second product HR, can perform inversion processing on the second product HR to obtain the second inverse matrix (HR)⁻¹ and can send the second inverse matrix (HR)⁻¹ to the first data party. The first data party can receive the second inverse matrix (HR)⁻¹.

The first data party can multiply the second inverse matrix (HR) and the first share <R>₀ of the random number matrix, to obtain the first share <H⁻¹>₀ of the first inverse matrix H⁻¹, and the second data party can multiply the second inverse matrix (HR)⁻¹ and the second share <R>₁ of the random number matrix, to obtain the second share <H⁻¹>₁ of the first inverse matrix H⁻¹ where H⁻¹=<H⁻¹>₀+<H⁻¹>₁=<R>₀(HR)⁻¹+<R>₁(HR)⁻¹=R×(HR)⁻¹.

In some implementations, in step S15, the first data party and the second data party can secretly share the third product respectively based on the first share of the first inverse matrix and the first share of the gradient of the loss function and based on the second share of the first inverse matrix and the second share of the gradient of the loss function. The first data party and the second data party each can obtain a share of the third product. For ease of description, a share obtained by the first data party can be used as a first share of the third product, and a share obtained by the second data party can be used as a second share of the third product. The sum of the first share of the third product and the second share of the third product is equal to the third product.

The first data party can subtract the first share of the third product from the first share of the original model parameter, to obtain the first share of the new model parameter. The second data party can subtract the second share of the third product from the second share of the original model parameter, to obtain the second share of the new model parameter.

It is worthwhile to note that in practice, the new model parameter can be used as a new original model parameter, to repeatedly perform step S1, step S13, and step S15. The model parameter determining method in this implementation is repeatedly executed, so the model parameter of the data processing model can be iteratively optimized and adjusted.

In the previous scenario examples, the first data party and the second data party can secretly share the third product H⁻¹×dW respectively based on <H⁻¹>₀ and <dW>₀ and based on <H⁻¹>₁ and <W>₁. The first data party can obtain the first share <H⁻¹×dW>₀ of the third product, and the second data party can obtain the second share <H⁻¹×dW>₁ of the third product.

The following describes a detailed process of secretly sharing the third product H⁻¹×dW by the first data party and the second data party.

The first data party and the second data party can secretly share <H>₀<dW>₁ respectively based on <H⁻¹>₀ and <dW>₁. The first data party can obtain <[<H⁻¹>₀<dW>₁]>₀, and the second data party can obtain <[<H⁻¹>₀<dW>₁]>₁, where <[<H⁻¹>₀<dW>₁]>₀+<[<H⁻¹>₀<dW>₁]>₁=<H⁻¹>₀<dW>₁.

The first data party and the second data party can further secretly share <H⁻¹>₀<dW>₀ respectively based on <dW>₀ and <H⁻¹>₁. The first data party can obtain <[<H⁻¹>₁<dW>₀]>₀, and the second data party can obtain <[<H⁻¹>₁<dW>₀]>₁, where <[<H⁻¹>₁<dW>₀]>₀+<[<H⁻¹>₁<dW>₀]>₁=<H⁻¹>₁<dW>₀.

The first data party can calculate <H⁻¹>₀<dW>₀+<[<H⁻¹>₀<dW>₁]>₀+<[<H⁻¹>₁<dW>₀]>₀ as the first share <H⁻¹×dW>₀ of the third product, and the second data party can calculate <H⁻¹>₁<dW>₁+<[<H⁻¹>₀<dW>]>₁+<[<H⁻¹>₁<dW>₀]>₁ as the second share <H⁻¹×dW>₁ of the third product:

$\begin{matrix} {{H^{- 1} \times {dW}} = {{\langle{H^{- 1} \times {dW}}\rangle}_{0} + {\langle{{H\;}^{- 1} \times {dW}}\rangle}_{1}}} \\ {= {{{\langle H^{- 1}\rangle}_{0}{\langle{dW}\rangle}_{0}} + {\langle\left\lbrack {{\langle H^{- 1}\rangle}_{0}{\langle{dW}\rangle}_{1}} \right\rbrack\rangle}_{0} + {\langle\left\lbrack {{\langle H^{- 1}\rangle}_{1}{\langle{dW}\rangle}_{0}} \right\rbrack\rangle}_{0} +}} \\ {{{{\langle H^{- 1}\rangle}_{1}{\langle{dW}\rangle}_{1}} + {\langle\left\lbrack {{\langle H^{- 1}\rangle}_{0}{\langle{dW}\rangle}_{1}} \right\rbrack\rangle}_{1} + {\langle\left\lbrack {{\langle H^{- 1}\rangle}_{1}{\langle{dW}\rangle}_{0}} \right\rbrack\rangle}_{1}}} \\ {= {{{\langle H^{- 1}\rangle}_{0}{\langle{dW}\rangle}_{0}} + {{\langle H^{- 1}\rangle}_{0}{\langle{dW}\rangle}_{1}} + {{\langle H^{- 1}\rangle}_{1}{\langle{dW}\rangle}_{0}} + {{\langle H^{- 1}\rangle}_{1}{\langle{dW}\rangle}_{1}}}} \\ {= {\left( {{\langle H^{- 1}\rangle}_{0} + {\langle H^{- 1}\rangle}_{1}} \right){\left( {{\langle{dW}\rangle}_{0} + {\langle{dW}\rangle}_{1}} \right).}}} \end{matrix}$

The first data party can calculate <W′>₀=<W>₀−<H⁻¹×dW>₀, and the second data party can calculate <W′>₁=<W>₁−<H⁻¹×dW>₁, where <W′>₀ represents the first share of the new model parameter, <W′>₁ represents the second share of the new model parameter, and W represents the new model parameter:

W′=<W′> ₀ +<W′> ₁ =<W> ₀ −<H ⁻¹ ×dW> ₀ +<W> ₁ −<H ⁻¹ ×dW> ₁ =W−H ⁻¹ ×dW.

In this implementation, the first data party and the second data party can cooperatively determine the model parameter of the data processing model by using the SS algorithm without leaking their own data. In addition, because the Newton's method is used, the model parameter determining method in this implementation has a relatively high convergence speed, so a quantity of times of model parameter optimization and adjustment can be reduced, and training efficiency of the data processing model can be improved.

Based on the same inventive concept, the present specification further provides an implementation of another model parameter determining method. This implementation is executed by a first data party, and the first data party can hold feature data and a share of an original model parameter. Referring to FIG. 3, this implementation can include the following steps.

Step S21: Secretly share a hessian matrix with a cooperation partner based on feature data and a share of a value of an activation function, to obtain a share of the hessian matrix.

In some implementations, the cooperation partner can be understood as a data party that performs cooperative security modeling with the first data party, and can be specifically the previous second data party. The first data party can secretly share a value of a polynomial with the cooperation partner based on a share of a first product, to obtain a share of the value of the polynomial as the share of the value of the activation function. The first product can be a product of the original model parameter and the feature data. The first data party can secretly share the first product with the cooperation partner based on the feature data and the share of the original model parameter, to obtain the share of the first product. The polynomial is used to fit the activation function.

The first data party can secretly share a gradient of a loss function with the cooperation partner based on the feature data and the share of the value of the activation function, to obtain a share of the gradient of the loss function.

In some implementations, the first data party can secretly share a diagonal matrix with the cooperation partner based on the share of the value of the activation function, to obtain a share of the diagonal matrix; and can secretly share the hessian matrix with the cooperation partner based on the feature data and the share of the diagonal matrix, to obtain the share of the hessian matrix. For a specific process, references can be made to related descriptions in step S11. Details are omitted here for simplicity.

Step S23: Secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix.

In some implementations, the first data party can secretly share a second product with the cooperation partner based on a share of a random number matrix and the share of the hessian matrix, to obtain a share of the second product. The second product can be a product of the random number matrix and the hessian matrix. The first data party can send the share of the second product to the cooperation partner; can receive a second inverse matrix fed back by the cooperation partner, where the second inverse matrix is an inverse matrix of the second product; and can multiply the second inverse matrix and the share of the random number matrix, to obtain the share of the first inverse matrix. For a specific process, references can be made to related descriptions in step S13. Details are omitted here for simplicity.

Or in some other implementations, the first data party can secretly share a second product with the cooperation partner based on a share of a random number matrix and the share of the hessian matrix, to obtain a first share of the second product. The second product can be a product of the random number matrix and the hessian matrix. The first data party can receive a second share that is of the second product and that is sent by the cooperation partner; can determine a second inverse matrix based on the first share of the second product and the second share of the second product, where the second inverse matrix is an inverse matrix of the second product; and can multiple the second inverse matrix and the share of the random number matrix, to obtain the share of the first inverse matrix. For a specific process, references can be made to related descriptions in step S13. Details are omitted here for simplicity.

Step S25: Secretly share a new model parameter with the cooperation partner based on the share of the original model parameter, the share of the first inverse matrix, and the share of the gradient of the loss function, to obtain a share of the new model parameter.

In some implementations, the first data party can secretly share a third product with the cooperation partner based on the share of the first inverse matrix and the share of the gradient of the loss function, to obtain a share of the third product. The third product can be a product of the first inverse matrix and the gradient of the loss function. The first data party can subtract the share of the third product from the share of the original model parameter, to obtain the share of the new model parameter. For a specific process, references can be made to related descriptions in step S15. Details are omitted here for simplicity.

In this implementation, the first data party can cooperate with the cooperation partner to determine the model parameter of the data processing model by using the SS algorithm without leaking their own data, to obtain the share of the new model parameter.

Based on the same inventive concept, the present specification further provides an implementation of another model parameter determining method. This implementation is executed by a second data party, and the second data party can hold a label and a share of an original model parameter. Referring to FIG. 4, this implementation can include the following steps.

Step S31: Secretly share a hessian matrix with a cooperation partner based on a share of a value of an activation function, to obtain a share of the hessian matrix.

In some implementations, the cooperation partner can be understood as a data party that performs cooperative security modeling with the second data party, and can be specifically the previous first data party. The second data party can secretly share a value of a polynomial with the cooperation partner based on a share of a first product, to obtain a share of the value of the polynomial as the share of the value of the activation function. The first product can be a product of the original model parameter and feature data. The second data party can secretly share the first product with the cooperation partner based on the share of the original model parameter, to obtain the share of the first product. The polynomial is used to fit the activation function.

The second data party can secretly share a gradient of a loss function with the cooperation partner based on the label and the share of the value of the activation function, to obtain a share of the gradient of the loss function.

In some implementations, the second data party can secretly share a diagonal matrix with the cooperation partner based on the share of the value of the activation function, to obtain a share of the diagonal matrix; and can secretly share the hessian matrix with the cooperation partner based on the share of the diagonal matrix, to obtain the share of the hessian matrix. For a specific process, references can be made to related descriptions in step S11. Details are omitted here for simplicity.

Step S33: Secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix.

In some implementations, the second data party can secretly share a second product with the cooperation partner based on a share of a random number matrix and the share of the hessian matrix, to obtain a share of the second product. The second product can be a product of the random number matrix and the hessian matrix. The second data party can send the share of the second product to the cooperation partner; can receive a second inverse matrix fed back by the cooperation partner, where the second inverse matrix is an inverse matrix of the second product; and can multiply the second inverse matrix and the share of the random number matrix, to obtain the share of the first inverse matrix. For a specific process, references can be made to related descriptions in step S13. Details are omitted here for simplicity.

Or in some other implementations, the second data party can secretly share a second product with the cooperation partner based on a share of a random number matrix and the share of the hessian matrix, to obtain a first share of the second product. The second product can be a product of the random number matrix and the hessian matrix. The second data party can receive a second share that is of the second product and that is sent by the cooperation partner; can determine a second inverse matrix based on the first share of the second product and the second share of the second product, where the second inverse matrix is an inverse matrix of the second product; and can multiple the second inverse matrix and the share of the random number matrix, to obtain the share of the first inverse matrix. For a specific process, references can be made to related descriptions in step S13. Details are omitted here for simplicity.

Step S35: Secretly share a new model parameter with the cooperation partner based on the share of the original model parameter, the share of the first inverse matrix, and the share of the gradient of the loss function, to obtain a share of the new model parameter.

In some implementations, the second data party can secretly share a third product with the cooperation partner based on the share of the first inverse matrix and the share of the gradient of the loss function, to obtain a share of the third product. The third product can be a product of the first inverse matrix and the gradient of the loss function. The second data party can subtract the share of the third product from the share of the original model parameter, to obtain the share of the new model parameter. For a specific process, references can be made to related descriptions in step S15. Details are omitted here for simplicity.

In this implementation, the second data party can cooperate with the cooperation party to determine the model parameter of the data processing model by using the SS algorithm without leaking their own data, to obtain the share of the new model parameter.

Based on the same inventive concept, the present specification further provides an implementation of a model parameter determining apparatus. Referring to FIG. 5, this implementation can be applied to a first data party, and can include the following units: a first SS unit 41, configured to secretly share a hessian matrix with a cooperation partner based on feature data and a share of a value of an activation function, to obtain a share of the hessian matrix; a second SS unit 43, configured to secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and a third SS unit 45, configured to secretly share a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

Based on the same inventive concept, the present specification further provides an implementation of a model parameter determining apparatus. Referring to FIG. 6, this implementation can be applied to a second data party, and can include the following units: a first SS unit 51, configured to secretly share a hessian matrix with a cooperation partner based on a share of a value of an activation function, to obtain a share of the hessian matrix; a second SS unit 53, configured to secretly share a first inverse matrix with the cooperation partner based on the share of the hessian matrix, to obtain a share of the first inverse matrix, where the first inverse matrix is an inverse matrix of the hessian matrix; and a third SS unit 55, configured to secretly share a new model parameter with the cooperation partner based on a share of an original model parameter, the share of the first inverse matrix, and a share of a gradient of a loss function, to obtain a share of the new model parameter.

The following describes an implementation of an electronic device in the present specification. FIG. 7 is a schematic diagram illustrating a hardware structure of the electronic device in this implementation. As shown in FIG. 7, the electronic device can include one or more processors (only one processor is shown in the figure), memories, and transmission modules. Certainly, a person of ordinary skill in the art can understand that the hardware structure shown in FIG. 7 is merely an example, and does not impose a limitation on the hardware structure of the electronic device. In practice, the electronic device can further include more or fewer component units than those shown in FIG. 7, or has a configuration different from the configuration shown in FIG. 7.

The memory can include a high-speed random access memory, or can include a non-volatile memory, such as one or more magnetic storage apparatuses, a flash memory, or another non-volatile solid-state memory. Certainly, the memory can further include a remotely disposed network memory. The remotely disposed network memory can be connected to the electronic device through a network such as the Internet, an intranet, a local area network, and a mobile communications network. The memory can be configured to store a program instruction or a module of application software, for example, at least one of the program instruction or the module in the implementation corresponding to FIG. 3 in the present specification, or the program instruction or the module in the implementation corresponding to FIG. 4 in the present specification.

The processor can be implemented by using any suitable method. For example, the processor can be a microprocessor or a processor and a computer readable medium storing computer readable program code (such as software or firmware) that can be executed by the microprocessor or the processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, or a built-in microcontroller. The processor can read and execute a program instruction or a module in the memory.

The transmission module can be configured to transmit data through a network such as the Internet, an intranet, a local area network, or a mobile communications network.

It is worthwhile to note that the implementations in the present specification are described progressively. For same or similar parts in the implementations, references can be made to each other. Each implementation focuses on a difference from other implementations. Especially, the apparatus implementation and the electronic device implementation are basically similar to the method implementation, and therefore are described briefly. For related parts, refer to partial descriptions in the method implementation. In addition, it can be understood that after reading the present specification, a person skilled in the art can figure out any combination of some or all of the implementations enumerated in the present specification without creative efforts. These combinations are also within the scope of disclosure and protection of the present specification.

In the 1990s, whether a technical improvement is a hardware improvement (for example, an improvement to a circuit structure, such as a diode, a transistor, or a switch) or a software improvement (an improvement to a method procedure) can be clearly distinguished. However, as technologies develop, current improvements to many method procedures can be considered as direct improvements to hardware circuit structures. A designer usually programs an improved method procedure into a hardware circuit, to obtain a corresponding hardware circuit structure. Therefore, a method procedure can be improved by using a hardware entity module. For example, a programmable logic device (PLD) (for example, a field programmable gate array (FPGA)) is such an integrated circuit, and a logical function of the PLD is determined by a user through device programming. The designer performs programming to “integrate” a digital system to a PLD without requesting a chip manufacturer to design and produce an application-specific integrated circuit chip. In addition, at present, instead of manually manufacturing an integrated chip, this type of programming is mostly implemented by using “logic compiler” software. The programming is similar to a software compiler used to develop and write a program. Original code needs to be written in a particular programming language for compilation. The language is referred to as a hardware description language (HDL). There are many HDLs, such as the Advanced Boolean Expression Language (ABEL), the Altera Hardware Description Language (AHDL), Confluence, the Cornell University Programming Language (CUPL), HDCal, the Java Hardware Description Language (JHDL), Lava, Lola, MyHDL, PALASM, and the Ruby Hardware Description Language (RHDL). The very-high-speed integrated circuit hardware description language (VHDL) and Verilog2 are most commonly used. A person skilled in the art should also understand that a hardware circuit that implements a logical method procedure can be readily obtained once the method procedure is logically programmed by using the several described hardware description languages and is programmed into an integrated circuit.

The system, apparatus, module, or unit illustrated in the previous implementations can be implemented by using a computer chip or an entity, or can be implemented by using a product having a certain function. A typical implementation device is a computer. The computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, or a wearable device, or a combination of any of these devices.

It can be seen from the descriptions of the implementations that a person skilled in the art can clearly understand that the present specification can be implemented by using software and a necessary general hardware platform. Based on such an understanding, the technical solutions in the present specification essentially or the part contributing to the existing technology can be implemented in a form of a software product. The computer software product can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, or an optical disc, and includes several instructions for instructing a computer device (can be a personal computer, a server, or a network device) to perform the methods described in the implementations or in some parts of the implementations of the present specification.

The present specification can be applied to many general-purpose or dedicated computer system environments or configurations, for example, a personal computer, a server computer, a handheld device or a portable device, a tablet device, a multi-processor system, a microprocessor-based system, a set-top box, a programmable consumption electronic device, a network PC, a minicomputer, a mainframe computer, and a distributed computing environment including any one of the previous systems or devices.

The present specification can be described in the general context of computer-executable instructions, for example, a program module. Generally, the program module includes a routine, a program, an object, a component, a data structure, etc. executing a specific task or implementing a specific abstract data type. The present specification can alternatively be practiced in distributed computing environments in which tasks are performed by remote processing devices that are connected through a communications network. In a distributed computing environment, the program module can be located in both local and remote computer storage media including storage devices.

Although the present specification is described by using the implementations, a person of ordinary skill in the art knows that many variations of the present specification can be made without departing from the spirit of the present specification. It is expected that the appended claims include these variations without departing from the spirit of the present specification. 

What is claimed is:
 1. A computer-implemented model parameter determining method, comprising: obtaining, by a first data party device, a first share of a Hessian matrix for a data processing model, wherein the Hessian matrix is secretly shared between the first data party device and a second data party device of a cooperation partner; obtaining, by the first data party device and using secret sharing with the second data party device, a first share of a product of a random number matrix and the Hessian matrix; providing, to the second data party device, the first share of the product of the random number matrix and the Hessian matrix; in response to providing the share of the product of the random number matrix and the Hessian matrix to the second data party device, receiving, by the first data party device, a second inverse matrix from the second data party device, wherein the second inverse matrix is an inverse of the product of the random number matrix and the Hessian matrix; determining, by the first data party device, a first share of a first inverse matrix based on the second inverse matrix and the first share of the random number matrix, wherein the first inverse matrix is an inverse of the Hessian matrix; determining, by the first data party device, the first inverse matrix based on the first share of the first inverse matric and a second share of the first inverse matrix received from the second data party device, wherein the second share of the first inverse matrix is based on the second inverse matrix and the second share of the random number matrix; and determining a first share of a product of the first inverse matrix and a gradient of a loss function of the data processing model using a first share of the gradient of the loss function; determining, a first share of a new model parameter for the data processing model based on an original model parameter of the data processing model and the first share of the product of the first inverse matrix and the gradient of the loss function; and determining the new model parameter based on the first share of the new model parameter and a second share of the new model parameter received from the second data party device.
 2. The computer-implemented method of claim 1, further comprising updating the data processing model with the new model parameter.
 3. The computer-implemented method of claim 1, wherein the data processing model is a machine learning model and the new model parameter comprises one of a weight or a bias of the machine learning model.
 4. The computer-implemented method of claim 1, wherein determining the first share of the new model parameter comprises subtracting the first share of the product of the first inverse matrix and the gradient of the loss function from the original model parameter.
 5. The computer-implemented method of claim 1, wherein the second share of the new model parameter is based on the original model parameter of the data processing model and a second share of the product of the first inverse matrix and the gradient of the loss function.
 6. The computer-implemented method of claim 5, wherein the second share of the product of the first inverse matrix and the gradient of the loss function comprises a product of the first inverse matrix and a second share of the gradient of the loss function secretly shared with the second data party device.
 7. The computer-implemented method of claim 1, wherein determining, by the first data party device, the first share of a first inverse matrix based on the second inverse matrix and the first share of the random number matrix comprises determining a product of the second inverse matrix and the first share of the random number matrix.
 8. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising: obtaining, by a first data party device, a first share of a Hessian matrix for a data processing model, wherein the Hessian matrix is secretly shared between the first data party device and a second data party device of a cooperation partner; obtaining, by the first data party device and using secret sharing with the second data party device, a first share of a product of a random number matrix and the Hessian matrix; providing, to the second data party device, the first share of the product of the random number matrix and the Hessian matrix; in response to providing the share of the product of the random number matrix and the Hessian matrix to the second data party device, receiving, by the first data party device, a second inverse matrix from the second data party device, wherein the second inverse matrix is an inverse of the product of the random number matrix and the Hessian matrix; determining, by the first data party device, a first share of a first inverse matrix based on the second inverse matrix and the first share of the random number matrix, wherein the first inverse matrix is an inverse of the Hessian matrix; determining, by the first data party device, the first inverse matrix based on the first share of the first inverse matric and a second share of the first inverse matrix received from the second data party device, wherein the second share of the first inverse matrix is based on the second inverse matrix and the second share of the random number matrix; and determining a first share of a product of the first inverse matrix and a gradient of a loss function of the data processing model using a first share of the gradient of the loss function; determining, a first share of a new model parameter for the data processing model based on an original model parameter of the data processing model and the first share of the product of the first inverse matrix and the gradient of the loss function; and determining the new model parameter based on the first share of the new model parameter and a second share of the new model parameter received from the second data party device.
 9. The non-transitory, computer-readable medium of claim 8, wherein the operations comprise updating the data processing model with the new model parameter.
 10. The non-transitory, computer-readable medium of claim 8, wherein the data processing model is a machine learning model and the new model parameter comprises one of a weight or a bias of the machine learning model.
 11. The non-transitory, computer-readable medium of claim 8, wherein determining the first share of the new model parameter comprises subtracting the first share of the product of the first inverse matrix and the gradient of the loss function from the original model parameter.
 12. The non-transitory, computer-readable medium of claim 8, wherein the second share of the new model parameter is based on the original model parameter of the data processing model and a second share of the product of the first inverse matrix and the gradient of the loss function.
 13. The non-transitory, computer-readable medium of claim 12, wherein the second share of the product of the first inverse matrix and the gradient of the loss function comprises a product of the first inverse matrix and a second share of the gradient of the loss function secretly shared with the second data party device.
 14. A computer-implemented system, comprising: one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations comprising: obtaining, by a first data party device, a first share of a Hessian matrix for a data processing model, wherein the Hessian matrix is secretly shared between the first data party device and a second data party device of a cooperation partner; obtaining, by the first data party device and using secret sharing with the second data party device, a first share of a product of a random number matrix and the Hessian matrix; providing, to the second data party device, the first share of the product of the random number matrix and the Hessian matrix; in response to providing the share of the product of the random number matrix and the Hessian matrix to the second data party device, receiving, by the first data party device, a second inverse matrix from the second data party device, wherein the second inverse matrix is an inverse of the product of the random number matrix and the Hessian matrix; determining, by the first data party device, a first share of a first inverse matrix based on the second inverse matrix and the first share of the random number matrix, wherein the first inverse matrix is an inverse of the Hessian matrix; determining, by the first data party device, the first inverse matrix based on the first share of the first inverse matric and a second share of the first inverse matrix received from the second data party device, wherein the second share of the first inverse matrix is based on the second inverse matrix and the second share of the random number matrix; and determining a first share of a product of the first inverse matrix and a gradient of a loss function of the data processing model using a first share of the gradient of the loss function; determining, a first share of a new model parameter for the data processing model based on an original model parameter of the data processing model and the first share of the product of the first inverse matrix and the gradient of the loss function; and determining the new model parameter based on the first share of the new model parameter and a second share of the new model parameter received from the second data party device.
 15. The computer-implemented system of claim 14, wherein the operations comprise updating the data processing model with the new model parameter.
 16. The computer-implemented system of claim 14, wherein the data processing model is a machine learning model and the new model parameter comprises one of a weight or a bias of the machine learning model.
 17. The computer-implemented system of claim 14, wherein determining the first share of the new model parameter comprises subtracting the first share of the product of the first inverse matrix and the gradient of the loss function from the original model parameter.
 18. The computer-implemented system of claim 14, wherein the second share of the new model parameter is based on the original model parameter of the data processing model and a second share of the product of the first inverse matrix and the gradient of the loss function.
 19. The computer-implemented system of claim 18, wherein the second share of the product of the first inverse matrix and the gradient of the loss function comprises a product of the first inverse matrix and a second share of the gradient of the loss function secretly shared with the second data party device.
 20. The computer-implemented system of claim 14, wherein determining, by the first data party device, the first share of a first inverse matrix based on the second inverse matrix and the first share of the random number matrix comprises determining a product of the second inverse matrix and the first share of the random number matrix. 